package com.test.controller;

import com.seata.api.BusinessService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @作者: 林江
 * @创建时间: 2023/12/5
 * @功能:
 */
@RestController
@RequestMapping("order")
public class BusinessController {

    @Autowired
    BusinessService businessService;

    @RequestMapping("purchase")
    public String purchase(String userId, String commodityCode, int orderCount) {
        businessService.purchase(userId, commodityCode, orderCount);
        return "success";
    }

}
